package plantsVSzombies;

public class ZombiesFire extends Zombies implements AddAttackInterface {

	private int hp;
	private int atk;
	private boolean addatk = true;

	public ZombiesFire() {
		super();
		this.hp = 200;
		this.atk = 30;
		System.out.println(" 攻击力：" + this.atk + " 生命值：" + this.hp);
	}

	public int getHp() {
		return hp;
	}

	public void setHp(int hp) {
		if (hp < 100 && this.addatk) {
			addAttack(hp);
			this.addatk = false;
		}
		this.hp = hp;
	}

	public int getAtk() {
		return atk;
	}

	public void setAtk(int atk) {
		this.atk = atk;
	}

	public String getName() {
		return "愤怒僵尸";
	}

	public void addAttack(int hp) {
		this.atk += 20;
		System.out.println();
		System.out.print("!!!"+this.getName() + "愤怒了，攻击力增加20，现在攻击力: "+this.atk);
	}

}
